package acm.华中农业;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;

public class E {
    public static void fun(String[] args) throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        String[] read = in.readLine().split(" ");
        int n = Integer.parseInt(read[0]);
        int k = Integer.parseInt(read[1]);
        int[][] arr=new int[n+1][2];
        for (int i = 1; i <= n; i++) {
            read=in.readLine().split(" ");
            arr[i][0]=Integer.parseInt(read[0]);    //投的人
            arr[i][1]=Integer.parseInt(read[1]);    //所需时间
        }
        while (k-- > 0) {
            read=in.readLine().split(" ");
            int end = Integer.parseInt(read[0]);
            int i = Integer.parseInt(read[1]);
            set.clear();
            int res = fun(arr, i);
            if (res!=-1&&res<=end){
                System.out.println("Holiday");
            }else {
                System.out.println("Stay");
            }
        }
    }

    public static void main(String[] args) {

    }


    public static int[] dp = new int[1000000 + 1];
    public static Set<Integer> set=new HashSet<>();
    //他的上一个 他的目标
    /**
     * i号学生所需的时间
     */
    public static int fun(int[][] arr, int i) {
        if (dp[i]!=0){
            return dp[i];
        }
        if (set.contains(i)) {
            dp[i]=-1;
            return dp[i];
        }
        set.add(i);
        if (arr[i][0] == 0) {
            return arr[i][1];
        }
        int res = fun(arr, arr[i][0]);
        res = res==-1?-1:res+arr[i][1];
        dp[i]=res;
        return dp[i];
    }
//    static {
//        int[][] arr = {
//                {},
//                {0, 4},
//                {1, 5},
//                {0, 2},
//                {1, 2},
//                {6, 2},
//                {5, 2},
//        };
//        set.clear();
//        System.out.println(fun(arr,3));
//        set.clear();
//        System.out.println(fun(arr,2));
//        set.clear();
//        System.out.println(fun(arr,4));
//        set.clear();
//        System.out.println(fun(arr,5));
//        System.out.println(fun(arr,6));
//    }

}
